// https://leetcode.cn/problems/kth-largest-element-in-an-array/
// Create d by ade on 2022/9/9.
//
#include <iostream>
#include <vector>
#include <algorithm>
#include <queue>

using namespace std;

class Solution {
public:
    int findKthLargest(vector<int> &nums, int k) {
        // 排序
//        sort(nums.rbegin(), nums.rend());
//        return nums[k - 1];

        // 优先队列
//        priority_queue<int> s = {};
//        for (auto i : nums) s.push(i);
//        for (int i = 0; i < k - 1; i++) {
//            s.pop();
//        }
//        return s.top();
        
    }
};

int main() {
    Solution so;
    vector<int> nums = {3, 2, 3, 1, 2, 4, 5, 5, 6};
    cout << so.findKthLargest(nums, 4);
    return 0;
}